#!/bin/sh

rootdir=$PWD

LOCAL_LIB=""
APPID="socket_server"

for jar in `find ./lib -name "*.jar"`
do
      LOCAL_LIB="$LOCAL_LIB:""$jar"
done

JAVACLASSPATH=./conf/:.:$LOCAL_LIB

echo "local libs:$LOCAL_LIB"

MAIN_CLASS=com.lazy.tcp.TelnetServer

nohup java -server -DAPPID=$APPID -classpath $JAVACLASSPATH $MAIN_CLASS 9108 &>./log/result.log &

touch ${rootdir}/pid/pid
echo $! > ${rootdir}/pid/pid

echo "end !!!"
